﻿using System;
using System.ComponentModel;
using System.Drawing;

namespace HML
{
    /// <summary>
    /// TabItem背景绘制前事件参数
    /// </summary>
    public class TabControlPlusTabItemDrawBackgroundBeforeEventArgs : CancelEventArgs
    {
        private readonly TabPagePlus tabPage;
        /// <summary>
        /// TabPage
        /// </summary>
        public TabPagePlus TabPage
        {
            get { return this.tabPage; }
        }

        private readonly float dpi;
        /// <summary>
        /// 系统缩放比例
        /// </summary>
        public float Dpi
        {
            get { return this.dpi; }
        }

        private readonly Graphics graphics;
        /// <summary>
        /// 封装一个GDI+绘图图面 （ 当前 Clip=ClipBounds_P ）
        /// </summary>
        public Graphics Graphics
        {
            get { return this.graphics; }
        }

        private readonly RectangleF tabBarBounds_P;
        /// <summary>
        /// 导航栏区域 （包含:内边距、内容）
        /// </summary>
        public RectangleF TabBarBounds_P
        {
            get { return this.tabBarBounds_P; }
        }

        private readonly RectangleF tabBarBounds_C;
        /// <summary>
        /// 导航栏区域 （包含:内容）
        /// </summary>
        public RectangleF TabBarBounds_C
        {
            get { return this.tabBarBounds_C; }
        }

        private readonly RectangleF itemsClipBounds_C;
        /// <summary>
        /// 允许显示所有选项的总剪辑区域 （包含:内容）
        /// </summary>
        public RectangleF ItemsClipBounds_C
        {
            get { return this.itemsClipBounds_C; }
        }

        private readonly RectangleF bounds_M;
        /// <summary>
        /// 当前选项区域（包含:外边距、内边距、内容）
        /// </summary>
        public RectangleF Bounds_M
        {
            get { return this.bounds_M; }
        }

        private readonly RectangleF bounds_P;
        /// <summary>
        /// 当前选项区域（包含:内边距、内容）
        /// </summary>
        public RectangleF Bounds_P
        {
            get { return this.bounds_P; }
        }

        private readonly RectangleF bounds_C;
        /// <summary>
        /// 当前选项区域（只包含:内容）
        /// </summary>
        public RectangleF Bounds_C
        {
            get { return this.bounds_C; }
        }

        private readonly RectangleF clipBounds_P;
        /// <summary>
        /// 当前选项剪辑区域（包含:内边距、内容）
        /// </summary>
        public RectangleF ClipBounds_P
        {
            get { return this.clipBounds_P; }
        }

        /// <summary>
        /// 当前选项背景绘制是否已处理完毕 (True 将会跳过控件的默认绘制)
        /// </summary>
        public new bool Cancel
        {
            get { return base.Cancel; }
            set { base.Cancel = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="tabPage">TabPage</param>
        /// <param name="dpi">系统缩放比例</param>
        /// <param name="graphics">封装一个GDI+绘图图面 （ 当前 Clip=ClipBounds_P ）</param>
        /// <param name="tabBarBounds_P">导航栏区域 （包含:内边距、内容）</param>
        /// <param name="tabBarBounds_C">导航栏区域 （包含:内容）</param>
        /// <param name="itemsClipBounds_C">允许显示所有选项的总剪辑区域 （包含:内容）</param>
        /// <param name="bounds_M">当前选项区域（包含:外边距、内边距、内容）</param>
        /// <param name="bounds_P">当前选项区域（包含:内边距、内容）</param>
        /// <param name="bounds_C">当前选项区域（只包含:内容）</param>
        /// <param name="clipBounds_P">当前选项剪辑区域（包含:内边距、内容）</param>
        /// <param name="cancel">当前选项背景绘制是否已处理完毕 (True 将会跳过控件的默认绘制)</param>
        public TabControlPlusTabItemDrawBackgroundBeforeEventArgs(TabPagePlus tabPage, float dpi, Graphics graphics, RectangleF tabBarBounds_P, RectangleF tabBarBounds_C, RectangleF itemsClipBounds_C, RectangleF bounds_M, RectangleF bounds_P, RectangleF bounds_C, RectangleF clipBounds_P, bool cancel) : base(cancel)
        {
            this.tabPage = tabPage;
            this.dpi = dpi;
            this.graphics = graphics;
            this.tabBarBounds_P = tabBarBounds_P;
            this.tabBarBounds_C = tabBarBounds_C;
            this.itemsClipBounds_C = itemsClipBounds_C;
            this.bounds_M = bounds_M;
            this.bounds_P = bounds_P;
            this.bounds_C = bounds_C;
            this.clipBounds_P = clipBounds_P;
        }

    }

}
